<?
	$sess = new Zend_Session_Namespace(CLU_NS);
?>

<div class="box white_bg">
<!--<script src="/public/library/jquery/jquery.translate-1.3.7.min.js" type="text/javascript"></script>-->
	   <div class="chitiet_bar">
	        <div class="chitiet_bar_left"></div>
	        <div class="chitiet_bar_right"><?=t(202)?></div>
	   </div>
	   <div class="chitiet_content">
	        <?if(strpos($sess->userPermissions, "update event") || 
            ($sess->user == $this->viewParams['event']['poster_id'] && strpos($sess->userPermissions,"update own event"))
            ) :?>
				<div style="background:#ffffff; text-align:right; width:100%;">
				<a href="<?=$this->hvnUrl(array('module' => 'event', 'action' => 'edit'))?>?id=<?=$this->viewParams['event']['id']?>"><?=t(135)?></a> 
				</div>
			<?endif ?>
			<?if(strpos($sess->userPermissions, "translate article")):?>
			<a href="<?=$this->hvnUrl(array('module' => 'article', 'action' => 'translate'))?>?id=<?=$this->viewParams['event']['article_id']?>&to=en"><?=t(90)?></a>
			<?endif?>
			
	       <div class="chitiet_title"><a href="#">&nbsp;&nbsp;<?=$this->viewParams['articleTitle'] ?></a></div>
	       <div class="text">
                 	<div class="clear"></div>
                 	<? if (isset($this->viewParams['articleBody'] )) :?>
						 <?=$this->viewParams['articleBody'];?>
						 <?endif ?>
	       		<?$metadata = unserialize($this->viewParams['event']['metadata']);?>
	       </div>
	       <div class="chitiet_case">
	        <?if(isset($this->viewParams['article_post_time'])) :?>
	             <?$date_time = explode(' ', date("G:i:s j/n/Y",$this->viewParams['article_post_time']))?>
	        <?endif?>
 				<?=t(136)?> <a href="<?=$this->hvnUrl(array("module" => "user", "controller" => "account", "action" => "view"), "generic") ?>?id=<?=$this->viewParams['event']['poster_id'] ?>"> <?if(isset($metadata['poster_name'])):?><?=$metadata['poster_name'] ?><?endif?></a>    
 				&nbsp;&nbsp;<?if(isset($date_time)) :?><?=t(3007)?> <?=$date_time[0]?>,&nbsp; <?=t(20)?> <?=$date_time[1]?><?endif?>           
               </div>
	       <div class="clear"></div>
	                    <div class="blog_news" style="height:auto;" align="left">
             <div class="blog_news_left"><?=t(777)?> :  <span class="chitiet_info">
                       <? if (isset($metadata['village_name'])) :?> 
						 <?= $metadata['village_name']?>,
						 <?endif ?>
						 <? if (isset($metadata['district_name'])) :?> 
						 <?= $metadata['district_name']?>,
						 <?endif ?>
						 <? if (isset($metadata['city_name'])) :?> 
						  <?= $metadata['city_name']?>
						 <?endif ?>
						</span>
						 <br/>
						 <?=t(754)?> : 
						 <?if(isset($this->viewParams['event']['startDate'])) :?>
						 	<?$startDate = explode('/', $this->viewParams['event']['startDate']);
							 if(isset($startDate[2]))
							 	unset($startDate[2]);
							 $displayDate = implode('/', $startDate);
						    ?>
						 	<?=$displayDate?>
						 <?endif?>
          -			<?=t(753)?> : 
						  <?if(isset($this->viewParams['event']['finishDate'])) :?>
						  	<?$finishDate = explode('/', $this->viewParams['event']['startDate']);
							 if(isset($finishDate[2]))
							 	unset($finishDate[2]);
							 $displayDate = implode('/', $startDate);
						    ?>
						  	<?=$displayDate?>
						  <?endif ?>
						 </div>
						<div class="blog_news_right">
						 <?=t(14)?> : <span class="chitiet_info">
						<? if (isset($metadata['type_name'])) :?> 
						         <?= p($metadata['type_name'])?>,
						 <?endif ?>
						 <? if (isset($metadata['rtype_name'])) :?> 
						         <?= p($metadata['rtype_name'])?>
						 <?endif ?>
						  </span>
						 </div>
						 <div class="clear"></div>
						 </div>
	    </div> 
	    <div class="clear"></div> 
	   
   	<script type="text/javascript">
		var oriLang = '<?= $this->viewParams['oriLang']?>';
		var lang = '<?= $this->viewParams['lang']?>';
	    googleTranslate(oriLang, lang, 'chitiet_title', 'text');
	    googleTranslate(oriLang, lang, 'chitiet_news_other_item', 'text');
	</script>
</div>